fix: Accept&ignore group_type for some views#7052
Merged
rjsparks merged 2 commits intoietf-tools:mainfrom Feb 12, 2024
Merged
Conversation
rjsparks
approved these changes
Feb 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7050
This adds a decorator that wraps a Django view and causes the view to ignore one or more kwargs if they are present when the view is called with a request. This is applied to views in the
ietf.group.urls.info_detail_urlsthat do not already acceptgroup_typeso that they won't fail when accessed by way ofietf.group.urls.grouptype_urls.A couple of views that accepted and ignored
group_typehave been refactored to use the decorator as a hint that they're not intended to use the parameter.One view,
ietf.group.milestones.reset_charter_milestones, has had its signature changed to allow it to work without thegroup_typeparameter. It already guards against the case that its group does not use charter milestones, so this tweak should allow it to work from a/group/xyzurl rather than only a/wg/xyzurl when it makes sense.